$(function () {
    $("#btn-login").on("click", function () {
        var data = $("#login-wrap").serialize();
        $.post("../php/login/login.php", data, function (res) {
            console.log(res);
            if (res.code == 100) {
                $.cookie("user_id", res.user_id , {path:"/"});
                location.href = "../index.html";
            }
            else {
                $(".alert").show();
            }
        }, "json");
    })
});